/*-------------------------------------------------------------------------

***************** Modification History ***********************************
   @doc
   @module mdmdefs.h - Header file for Modem communications |
   @end
   
$Log: /SoftPay/SPK2SIM/Source/Include/modem.h $ 
**************************************************************************

   Copyright (C) 1999 by VeriFone, Inc.

   All rights reserved.  No part of this software may be reproduced,
   transmitted, transcribed, stored in a retrieval system, or translated
   into any language or computer language, in any form or by any means,
   electronic, mechanical, magnetic, optical, chemical, manual or otherwise,
   without the prior written permission of VeriFone, Inc.

---------------------------------------------------------------------------*/
#ifndef MDMDEFS_H
#define MDMDEFS_H

#include <sizes.h>

#define PRIMARY_LINE        0
#define SECONDARY_LINE      1
#define MAX_DIAL_LINES		2

#define  DTR_ON             0x01                                        
#define  DTR_OFF            0x00                                        
#define  RTS_ON             0x02
#define  RTS_OFF            0x00
#define  DTR_RTS_ON         0x03
#define  SetCtrl            0x0000  

#define SIGNAL_INFO         3
#define CTS_BIT             0x20

//#define DTR_DIAL            TRUE
//#define SYNC_CTS_CHECK      TRUE
#ifdef SYNC_CTS_CHECK
  #define VFI_SYNC_CONNECT    92
#endif  

#define     MDM_CMD_WAIT_TIME           55          // the dreaded delay

#define MODEM_ENVIRONMENT_VARIABLE          "*MI"



#define MODEM_ENVIRONMENT_VARIABLE          "*MI"


#define SOFTPAY_BASE_MDM_ENV_VAR1           "M1"
#define SOFTPAY_BASE_MDM_ENV_VAR2           "M2"
#define SYNC_MODEM_ENVIRONMENT_VARIABLE     "M3"
#define ASYNC_MODEM_ENVIRONMENT_VARIABLE    "M4"
#define MODEM_ENVIRONMENT_VARIABLE1         "M5"



#define DIALER_PIPE_ID      "P:DIALER"
#define SOFTPAY_PIPE_ID     "P:SOFTPAY"

#define MDM_DEV_HANDLE      7

#define MDM_DEV_CONFLICT    -10101
#define MDM_DEV_ABORT       -10102

#define SEND_COMM_TIMEOUT	3000
#define DEVICE_NAME_SIZE	32

typedef struct syncdial_struct
{

	//short hModem;
	short shBaudRate;
	short shDataFormat;
	char  szPABXCode[PABX_CODE_SIZE+1];
	char  szPhoneNumber[PHONE_NUM_SIZE + 1];
	short shModemMode;
	short shSyncSwitchDelay;
	
    int fDialType        : 1;    /* 0-Tone 1-Pulse */
    int fCommType        : 1;    /* 0-Bell 1-CCITT */
    int fTDK_MODEM       : 1;    /* OMNI3750 TDK-MODEM */
    int fAsync           : 1;    /* 0-Sync 1-Async */
    int fAbort           : 1;    /* 1-ABORT */
    
} SYNC_DIAL_OBJECT;

typedef struct dialer_resp
{

	//short hModem;
	short shMdmDialStatus;
    
} DIALER_RESP;

#endif
